package com.dance.spring.learn.service;

import com.dance.spring.learn.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService {

//    @Autowired
//    @Qualifier(value = "userDao")
//    public UserDao userDao;

    @Resource
    public UserDao userDao;

    @Value(value = "flower")
    public String name;

    public void add(){
        System.out.println("add ......:"+name);
        userDao.add();
    }

}
